50,012 results • Page 3 of 1001
First of all, I'm very new to bioinformatics. I have to use BioPython to create multiple sequence alignments for an assignment using ClustalW2. So, I installed the ClustalW2 command...line and the "opuntia.fasta" file from the BioPython tutorial and wanted to try creating an alignment out of it to practice. Here is my code: from Bio.Align.Applications...cline() But when I run this, I ge…
updated 6.5 years ago • beckykalinger
Dear all, This is my first time working with Biopython. I tried to translate unambigous rna sequences from a multi-fasta format file (containing 5 different random sequences...I get 3 sequences only translated. But these are from the last sequence (= means 5th sequence from fasta file) of the random RNA with all 3 possible translation of RNA. I did not find any other method that could write my t…
updated 5.4 years ago • macadamopetrus
Maybe i am missing something or need more coffee but... Is there a biopython class to parse the Remark lines of a pdb file
updated 11.0 years ago • quentin.delettre
I wish to index a multi-fasta file I have but I'm having problems getting the BioPython manual example to work. From section 5.4.2 (pg 59). I have the required...fasta file in my Python folder The first few lines work just as they do in the manual: ``` >>> from Bio import SeqIO >>> orchid_dict...SeqIO.index("ls_orchid.fasta", "fasta") >>&…
updated 2.1 years ago • tyleraelliott
Is there a ready-made command-line program that can output sequence lengths from a fasta file? Like so: ``` YKR054C,4092 YLR106C,4910 ... ``` I've seen [examples][1] of people trying to roll their own using `awk`, but I would rather...not do that if I can avoid it. Between Emboss, Biopython, Bioperl, etc there must be something that can do this, right? What I'm looking for would be the equivale…
updated 2.3 years ago • bongbang
I'm just about to need to convert some MAF files to fasta alignment files, which from some cursory googling I understand is possible with BioPython/Perl among other...tools. My question is what do the converters actually *do* to give you the fasta? My understanding at present is that a MAF file contains multiple spans of local sequence alignments, where as an aligned...fasta contains sequences t…
updated 5.8 years ago • Joe
I'm looking to run a number of Fasta files simultaneously using local blast for a pipeline. Im using biopython to read in my input file and parse through...for a specified number of sequences e.g. 1000 if the file is larger i batch it out into segments of 1000. But i'm now looking for a way be able to run each file through local blast rather...entry = None if entry is None: …
updated 6.1 years ago • New2programming
in some related species (ex. S. paradoxus, K. lactis). To automate this, I created a script using Biopython that searches for the NCBI gene ID [851838, 851943, 856133, ....]. While testing my code, I realized that running the blast...specify which database you would like to pull from? I would later figure out how to do that within a Biopython script. 2. Is there a way to get Biopython to take a …
updated 7.5 years ago • kahackbarth27
I was wondering if I could use Biopython in order to trim a local gb file. Ex. I have a 100kb gb file but I am interested in a continuous 25kb portion. I know the...location of the start and stop of the 25kb region. How do I create a gb file which contains only that 25kb portion from the larger file
updated 6.7 years ago • 13dsc
Hi, I keep coming up against these problem when writing scripts using BioPython SeqIO.. The first, is I can't find in the documentation of BioPython (or the cookbook) how to change a SeqcRecord attribute...Hi, I keep coming up against these problem when writing scripts using BioPython SeqIO.. The first, is I can't find in the documentation of BioPython (or the cookbook) how to change a SeqcRe…
updated 2.6 years ago • susan.klein
I am dealing with two fasta files and wanted to align them with clustal using biopython. I want these two files as two sequences in this code, i.e., `ref_seq...fasta file 1` and `target_seq=fasta file 2`. Can anyone help? >>from Bio.Seq import Seq >>from Bio.SeqRecord import SeqRecord...unaligned.fasta" >>out_file = "aligned.fasta" …
updated 6.9 years ago • sssss
accession numbers from ncbi and intervals i need to download. Is there a way to download not a whole FASTA file, but only a certain interval with python/biopython or R (or using some other soft)? An example list is provided below
updated 4.3 years ago • hazirliver
I should start out by saying that I'm as new as it gets to both Python and Biopython. I'm trying to split a large .fasta file (with multiple entries) into single files, each with a single entry. I found most...of the following code on the Biopython wiki/ Cookbook site, and adapted it just a bit. My problem is that this generator names them as "1.fasta", "2.fasta", etc...StopIteration : …
updated 12.0 years ago • charles.bridges
I'm trying to concatenate nexus files using BioPython as [documented in this page here][1]. It seems to create the objects just fine but fails to write the actual...file - without any error. from Bio.Nexus import Nexus file_list = ['T591_1.nex','T591_2.nex'] nexi = [(fname, Nexus.Nexus(fname)) for fname...Any help would be greatly appreciated. I don't know python and this i…
updated 3.9 years ago • nmkn
DIST/docs/api/Bio.bgzf-module.html) and I'm sufficiently confused by it. To create an example bgzf file, I've tried the following. The [`write`](https://github.com/biopython/biopython/blob/cfb26444d0c84fa5d0aa8f1ed897941afd02e58b...text) test.close() # works fine ``` But when parsing, I'm getting a `ValueError` when parsing the file. `zcat` works just fine at the command line. ```python infi…
updated 4.6 years ago • mrals89
I have a multi-fasta file containing sequences with headers such as: ``` >AAST01014508.1|(1..6240)|LTR/Pao|ROOA_I-int:ROOA_LTR >AAST01026747.1...the header where the position is given I want to index all of the sequences using this and print to file all those sequence from the C strand, e.g. `>AAST01026747.1|c(2745..6820)|LTR/Pao|ROO_I-int` I was able to create a function..…
updated 2.1 years ago • tyleraelliott
Hi I am trying to figure out a basic script to edit the names of the species in my FASTA file. I need the final product of the names to look like this: >Homo_sapiens (FTO_NP_001073901) >Pan_troglodytes (FTO_XP_510968
updated 14 months ago • Daphnia3000
Hi, I am trying to blast certain sequences (in fasta files) against the drosophila genome using the qblast operation provided in BioPython. From the documentations, I have...to enter in qblast refers to the database against which you are trying to BLAST. I went through the BioPython documentation, but wasnt able to understand how to blast against the drosophila genome. That is, I couldn't figure
updated 11.5 years ago • nikhil.joshi92
am new to computational biology and Python and lately, I've been fiddling with Python, specifically Biopython, to parse FASTA files and present summary information of the sequences in the file in an elegant manner. I understand...that ORFs can be identified and translated via Biopython using this tutorial: http://biopython.org/DIST/docs/tutorial/Tutorial.html#htoc51 In my case though, I don't w…
updated 20 months ago • hamaisa
Hi, I'm new to biopython. I can't seem to get nested for loops to iterate properly. Here's a simple example: from Bio import SeqIO infile = file...testseq.fna') midfile = file('mids.fna') c = 0 for midseq,line in SeqIO.parse(midfile,"fasta"): print midseq.id print midseq.seq for line in SeqIO.parse...infile,"fasta"): print line.seq I have 12 simple fasta records in te…
updated 12.1 years ago • T
Hi, I am trying to generate .pdb files from fasta sequences using BioPython SeqIO module to parse them to Pymol, and fab command: from Bio import SeqIO for seq_record...in SeqIO.parse(file, "fasta"): pymol.cmd.do("fab %s, %s" % (seq_record.seq, seq_record.id)) pymol.cmd.save("%s.pdb" % seq_record.id, "all") The script produces...the files without displaying any errors, b…
updated 3.1 years ago • lqdo2000
Hello, I am currently facing an issue when making BLAST queries using the Biopython library. When using the website, once I made my tblastn query, I just have to go under downloads and select FASTA (aligned...Hello, I am currently facing an issue when making BLAST queries using the Biopython library. When using the website, once I made my tblastn query, I just have to go under downloads and sel…
updated 2.7 years ago • jeremybaffou
Hi, I am running out of ideas to do this, and I will appreciate some help, please.I have 2 fasta files from two different bacterial strains with 1000 genes each. An example of files: file A: fileB query seq.id query...obj_1B seq.id objB seq obj_1B seq But I just dont know how to split the fasta files. I was trying to…
updated 6.7 years ago • bio90029
Let me know if I'm incorrect and there exists a widely useful FASTA file visual editor) What tools do you use for working with FASTA files, and what might you want to see in a FASTA file graphical...editor? I feel like there are some simple tasks when working with FASTA files that we should have a GUI editor for by this point, something like "highlight x1 to x2 on this header in this file" or..…
updated 2.2 years ago • Nancy Ouyang
I'm have several .gb files from Vector NTI that I need for convert to FASTA format. I figured it would be easy, using Biopython. However, as we all know...sequences, output_handle, "fasta") output_handle.close() input_handle.close() ``` And here's the error: ``` Traceback (most recent call last): File "abi2fastq.py...line 3, in <module> from Bio import SeqIO File "/usr/lib64/py…
Hi, I would like to parse a fasta file and get all headers and seqs that match some strings (so called pattern below). What happens is that all the headers...script returns all sequences so it´s not working as expected. Can you help finding what´s wrong ?? # biopython
updated 6.7 years ago • David
I've been thinking a lot about this problem and I don't know how to solve it. I have a fasta file with microRNAs precursors and a bed file with the coordinates of this precursors in a genome. fasta file microRNAs...I've been thinking a lot about this problem and I don't know how to solve it. I have a fasta file with microRNAs precursors and a bed file with the coordinates of this precursors i…
updated 4.1 years ago • Amaranta Remedios
HI I am trying to parse a fasta file by a key word in the description using biopython (1.73). I am a novice and perhaps this question has been asked and answered...but I cant seem to find the solution myself. My fasta file looks like this. I want to create a file that contains only the sequence with gene=balVIM &gt;lcl|KP771862.1_gene_1
updated 5.2 years ago • steven.marshall2
hi, I tried to read a .bam file, by uncompress the file with bgzf module provided by biopython but only some indexed parts are readable. I saw that the...file is build by different compressed block, but how to read it with biopython ? from Bio import SeqIO import gzip from Bio import
updated 7.4 years ago • loic.laureote
I am very new to Biopython and need someone to help me out. My problem is the following, I have 100 geneIDs and I want to know their FASTA sequence
updated 4.8 years ago • ricordo.yan
Hello, I have an almost similar question to the topic https://www.biostars.org/p/154993/ I have a fasta file with align sequence and I want to generate a consensus. So far I wrote : import sys from Bio import AlignIO from Bio.Align...import AlignInfo alignment = AlignIO.read("input.fasta", 'fasta') summary_align = AlignInfo.SummaryInfo(alignment) summary_align.dumb_…
Hi All I've written some BioPython but I want to be able to generate an error message if the protein searched for is not in my fasta file? I've use try and...for myuniprot in myuniprots: try: for record in SeqIO.parse("uniprot_sprot.fasta", "fasta"): protein_id = record.id.split('|')[1] if '|' in record.id else record.id protein_name = record.id.split('|')[2] …
updated 7.1 years ago • chrisgbeldam
when I go to make the consensus chromosome I can not figure out how to include the drop out in the file. For the mapping I'm using TMAP (ion torrent data, single end reads), freebayes for the haploid vcf creation, and SnpEff for...the SNP annotation. I know if I want to create a new chromosome of our sample I can use the vcf file to make the SNP changes in the reference file, however that wil…
How do I extract a specific residue from a pdb file though biopython? for example I have to extract 23,24th and 27th residue only. How do I do that? Here is my code: ```py from Bio.PDB...How do I extract a specific residue from a pdb file though biopython? for example I have to extract 23,24th and 27th residue only. How do I do that? Here is my code: ```py from Bio.PDB import * from itertools…
updated 16 months ago • fareehakanwal90
you posted at http://biostar.stackexchange.com/questions/2515/how-to-parse-psiblast-results-using-biopython-and-blast-2-2-24 i tried to use the same but it doesnt seem to work for me. can you suggest me why? code that i used: psi_cline...psiblast', db = 'refseq_protein',\ query = queryID+".fasta", evalue = 10 , \ …
updated 12.8 years ago • Molly
Hello, i am trying to write a program using biopython that will align some sequences from a fasta file (for the test that i will present 5 of them) against a fasta file containing...SeqIO from Bio.Align import PairwiseAligner genome_file = "CP000033.3[1..1993560].fasta" genome_sequence = next(SeqIO.parse(genome_file, "fasta")).seq gene_file = "genes.fasta" …
updated 10 months ago • Chris K
I have a fasta file with more than 500 sequences, and from that file I need to build a table, so I am trying to write a script to do it instead...of doing it by hand, with copy-paste. I am reading the file using Biopython : seq=SeqIO.parse(handle, "fasta") From each sequence I want to know the specie the protein sequence belongs...the name of the protein and the Uniprot ID. when I use the SeqIO …
updated 11.3 years ago • Peiska
Hello, I woud like to ask you... I have file of like 1000 sequences from BLAST results with clasic header like this... "&gt;PLN78092.1 putative endo-1,3(4)-beta-glucanase...I would like to change the header of every sequence to contain only name of organisms... using biopython. "&gt;Aspergillus taichungensis" When I download results in fasta format and I parse it using biopython I ca…
updated 4.6 years ago • martinsindelar0077
converting the file from fastq to fasta SeqIO.convert(seq_file,"fastq",labels[0]+".fasta","fasta") no problem; but now I would like to change the header...I did, and the script fails. I thought the way this script would work is it would convert the file, making the new fasta file (which it does when I do not have the parse function in there), then parsing that file. So now I'm wondering...w…
updated 3.1 years ago • skbrimer
Hello everybody, I'm using Biopython 1.56 compiled from source on Ubuntu 10.10 64-bit. It's a great piece of software and I love to work with it. But there...the for-statement with the print commands, "Bio.SeqIO.write()" refuses to write the sequences to the file. Is this the desired behavior? Is the for-loop iterating the parser object to its end and leaves it there? Could anyone help...out?…
updated 8.9 years ago • Markus
I have been working with phylogenetic trees and I am using biopython 1.72. The module "BaseTree" has class "Tree" and there is a class method named "randomized" which "create a randomized...has a knowledge about this pakage, 1) I want to ask if this method can be used for protein sequence files ? For example, for an aligned sequence file, if the taxa names are stored as the keys of dictionary a…
updated 5.5 years ago • mdsiddra
I'm trying to run codeml in Biopython, following by Biopython cookbook. But it doesn't work with an FileNotFoundError: [WinError 2]. I found ctl file does...not contain file's full path, like seqfile = seq2.phy outfile = result.out treefile = template.tree Files are on `'C:/Users/admin/Desktop'.` I set...C:/Users/admin/Desktop/result.out', 'C:/Users/admin/Desktop/template.t…
updated 5.3 years ago • mtbreeze
Hi guys I have 32GB of memory ram in my pc and I am trying to count all the aac from a compressed fasta file of 67GB. Of course I tried to use all the tools I know, biopython, generators, etc and I have still inefficient results...t try any linux stuff because I am trying to use python. I was trying to make a long string from the file and then count the aacs. def element_count(filename): …
updated 4.4 years ago • schlogl
Hello!** I have question about compare fasta-files. **Input:** I have ~11.000 fasta-files. This files are of different length, for example, some files around 29.000 bp but...some files around 28.000 bp. **Output:** I would like have info about unique fasta-files. For example: We have 7 fasta-files. 1,2,5,6 and 7 have...the same SNP, so the 1 fasta-file interested me. 1, 3 and 4 samples hav…
updated 3.7 years ago • L_LANKA
Hello All, I have multiple fasta files. I want to make output files for each chromosome from all the fasta files. For example, output file `all_ch1.fasta...will have `ch1` sequences from all the fasta files and so on. I tried: samtools faidx *fasta.gz ch1 &gt; all_ch1.fasta But I am getting this error: [W::fai_get_val] Reference...sample2.fasta.gz not found in FASTA file, …
updated 3.0 years ago • evafinegan
I have some FASTA files with a lot of sequences inside each one, but I need to have just one file with all of these senteces inside it! How can...I merge this files without losing FASTA formatting
updated 7.0 years ago • l.souza
I'm following this [Biopython tutorial][1]. Where the tutorial uses DNA "instances" to create a motif, I need to use an aligned fasta. I tried alphabet...Gapped(IUPAC.protein) alignment = AlignIO.read("my_seqs.afa", "fasta", alphabet=alphabet) m = motifs.create(alignment) but that results in Traceback (most recent call last): File "", line 1, in File...motifs/__init_…
updated 4.7 years ago • kinetic
Hi there I have a compressed fasta file (really big) and I was thinking if it is possible to use the SimpleFastaParser(biopython), gzip.open to feed the sequeces
updated 4.3 years ago • schlogl
Hi biostars! I'd like to write a program to download some complete genome fasta files of a list of species from NCBI. However, when I use BioPython, I can not get the result I want. `from Bio import Entrez...handle)` `ids = record['IdList']` ids will return lots of numbers and some of ids are not fasta files. Is there a better method to fetch exactly a file contain all contigs in a certain gen…
updated 7.9 years ago • thustar
I'm running a script which finds regions of interest, outputs them to a fasta, then passes them to blastn. Both steps work independently, but the script wont wait for the file to be generated and says...for all generated sequences. ('', 'Warning: [blastn] Query is Empty!\n') All done, see files: tester-table.txt, tester.fasta and tester.bln The script is basically this: def main(): …
updated 6.4 years ago • Daniel
50,012 results • Page 3 of 1001
Traffic: 2080 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6